<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="<%=path%>/css/base.css">
<link rel="stylesheet" type="text/css" href="<%=path%>/css/layout.css">
<script src="<%=path%>/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
	$(function() {

		var width = screen.availWidth;
		var height = screen.availHeight;
		$(".wxts").css({
			"width" : width,
			"height" : height
		});
		$(".wxts_btn").click(function() {
			$(".wxts").css("display", "none");
		});
		$("[name=guanbi]").click(function(){
			$(".wxts").css("display", "none");
		});
		$("[name=checkall]").click(function(){
			$("[name=checkboxs]").prop("checked", true);
		});
		$("[name=uncheck]").click(function(){
			$("[name=checkboxs]").prop("checked", false);
		});
		$("[name=ss_add]").click(function(){
			$(".wxts").css("display", "block");
			$("#a_id").val("");
			$("#a_idd").val("");
			$("#a_content").text("");
			$("#a_url").val("");
			$("#a_title").val("");
			$("#a_activity_time").val("");
			$("#a_id").prop("name","add_id");
			$("#a_idd").prop("name","add_idd");
			$("#a_url").prop("name","add_url");
			$("#a_content").prop("name","add_content");
			$("#a_title").prop("name","add_title");
			$("#radio_0").prop("name","add_radio");
			$("#radio_1").prop("name","add_radio");
			$("#radio_1").prop("checked",false);
			$("#radio_0").prop("checked",false);
			$("#a_activity_time").prop("name","add_time");
			$("#qqqddd").val("添加");
			$("#title_name").text("添加");
			
		});
		$(".xxxxx").click(function() {
			$(".wxts").css("display", "block");
			var tb = $(this).parent().children();
			var id = tb[0].innerHTML;
			var url = tb[3].innerHTML;
			var title = tb[2].innerHTML;
			var content=tb[4].innerHTML;
			var time=tb[6].innerHTML;
			var type=tb[5].innerHTML;
			if(type=="进行中"){
				$("#radio_1").prop("checked","checked");
			}else{
				$("#radio_0").prop("checked","checked");
			}
			$("#qqqddd").val("修改");
			$("#title_name").text("修改");
			$("#a_id").val(id);
			$("#a_idd").val(id);
			$("#a_content").text(content);
			$("#a_url").val(url);
			$("#a_title").val(title);
			$("#a_activity_time").val(time);
			$("#a_id").prop("name","xg_id");
			$("#a_idd").prop("name","xg_idd");
			$("#a_url").prop("name","xg_url");
			$("#a_content").prop("name","xg_content");
			$("#a_title").prop("name","xg_title");
			$("#radio_0").prop("name","xg_radio");
			$("#radio_1").prop("name","xg_radio");
			$("#a_activity_time").prop("name","xg_time");
		});
		
	});
</script>
<style type="text/css">
.wxts {
	background-color: #000000;
	position: fixed;
	top: 0px;
	left: 0px;
	display: none;
	background: rgba(10, 10, 10, 0.5);
}

.wxts_ts {
	text-align: center;
	background-color: #FFFFFF;
	width: 350px;
	height: 400px;
	margin: 18% auto;
	border-radius: 6px;
}

.wxts_ts h1 {
	padding-top: 10px;
}

.wxts_ts p {
	margin-top: 20px;
}

</style>
</head>
<body>
	<div class="bsinfo">
		<div class="bsinfo_title">系统幻灯片</div>
		<form action="backstage_huodong" method="post">
		<div class="slideshow_btn fdr" name="ss_add">添加</div>
			<div class="bsinfo_body">
				<div class="bsinfo_body_box">
					<table style="width: 96%; padding: 10px 2%;" border="0"
						cellpadding="0" cellspacing="0" name="ss_tb">
						<tr style="text-align: center;">
							<td>id</td>
							<td>预览</td>
							<td>标题</td>
							<td>url</td>
							<td>内容</td>
							<td>活动状态</td>
							<td>活动时间</td>
							<td>操作</td>
						</tr>
						<c:forEach items="${list }" var="a">
							<tr style="text-align: center;">
								<td>${a.getId()}</td>
								<td><img src=${a.getActivity_img()}
									style="width: 150px; height: 80px"></td>
								<td>${a.getTitle()}</td>
								<td>${a.getActivity_img()}</td>
								<td>${a.getContent()}</td>
								<td>${a.getActivity_state()}</td>
								<td>${a.getActivity_time()}</td>
								<td class="xxxxx" style="background-color: black; color: white">修改</td>
							</tr>
						</c:forEach>
					</table>
				</div>
			</div>
		</form>
	</div>


	<div class="wxts">
		<div class="wxts_ts">
			<h1 id="title_name">修改</h1><br>
			<form action="backstage_huodong"  method="post">
				 &nbsp;&nbsp;&nbsp;i&nbsp;&nbsp;d &nbsp;: &nbsp;<input id="a_id" type = "hidden" name="xg_id"><input id="a_idd" name="xg_idd" disabled="disabled">
				 <br><br>
				&nbsp; 标&nbsp;题&nbsp;:&nbsp; <input id="a_title" type = "text" name="xg_title">
				<br><br>
				  &nbsp;U&nbsp;R&nbsp;L: <input id="a_url" type = "text"  name="xg_url">
				  <br><br>
				&nbsp;  内&nbsp;容&nbsp;:&nbsp; <textarea rows="4" cols="" id="a_content"  name="xg_content"></textarea>
				<br><br>
				 活动状态: <input type="radio" name="activity_state" value="0" id="radio_0">&nbsp;已&nbsp;完&nbsp;成&nbsp;
				&nbsp; <input type="radio" name="activity_state" value="1" id="radio_1">&nbsp;进&nbsp;行&nbsp;中&nbsp;
				<br><br>
				  活动时间: <input id="a_activity_time" type = "text"  name="activity_time">
				  <br><br>
				  <input id="qqqddd" type="submit" value="修改">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="guanbi" value="关闭">
			</form>

		</div>
	</div>
</body>

</html>